/**
 * 随机数
 */
export function random (digits) {
    const code = [];
    for (let i = 0; i < digits; i++) {
        code[i] = Math.floor(Math.random() * 10);
    }
    while (code[0] === 0) {
        code[0] += Math.floor(Math.random() * 10);
    }
    return code.join('');
}
